package com.zjw.zy.componse.demo.fragment

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.unit.dp
import androidx.compose.ui.viewinterop.AndroidView
import com.zjw.zy.componse.demo.base.BaseComposeFragment
import com.zjw.zy.componse.demo.ui.theme.MyApplicationTheme
import com.zjw.zy.componse.demo.view.RectView

/**
 * @author     ：zhong.jw
 * @date       ：Created in 2023/2/24 9:27
 * @description：
 */
class RotateTestFragment : BaseComposeFragment() {
    override fun onContentView(rootView: ComposeView) {
        rootView.setContent {
            MyApplicationTheme {
                Box(modifier = Modifier.fillMaxSize()) {
                    AndroidView(factory = {
                        RectView(it)
                    }, modifier = Modifier
                        .size(200.dp, 200.dp)
                        .align(Alignment.Center))
                }
            }
        }
    }

    override fun onSubscribeValue() {

    }
}